import http from '../../utils/http.js'

/* 发送短信 */
export function sendSms(phone,type,merchant){
	return new Promise((resolve,reject)=>{
	    var params={
		   url:'/v1/sms/get/code',
		   method:'POST',
		   data:{
			   mobile:phone,
			   type:type,
			   merchant:merchant
		   },
		   callBack:(res)=>{
			if(res.code==0){
			 resolve(res)
			}
			else{
			 reject(res.msg)
			}
		}
	  }
	  http.request(params)
	})
}